import React from "react";

export interface CusMenuItem {
    id: number,
    text: string,
    path: string,
    defaultImg?: string,
    activeImg?: string,
    icon?: string | React.ReactNode; // 支持字符串（动态图标）或 React 节点（自定义图标）
    active: boolean
    tabbar: boolean
    pc: boolean
}

// 确保只有一个 active 字段为 true
const initialNavMenu: CusMenuItem[] = [
    {
        id: 1,
        text: '首页',
        path: "/",
        icon: "home",
        active: true,
        tabbar: true,
        pc: true
    },
    {
        id: 2,
        text: '工具',
        path: "/tools",
        icon: 'tool',
        active: true, // 删除: active: true,
        tabbar: true,
        pc: true
    },
    {
        id: 3,
        text: '统计',
        path: "/statistics",
        icon: 'statistic',
        active: true, // 删除: active: true,
        tabbar: true,
        pc: true
    },
    {
        id: 4,
        text: '设置',
        path: "/settings",
        icon: 'setting',
        active: true, // 删除: active: true,
        tabbar: true,
        pc: false
    }
];

export const navMenu: CusMenuItem[] = initialNavMenu.filter(item => item.active);

